package cn.edu.scau.cmi.xuxingao.client;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

import cn.edu.scau.cmi.xuxingao.adapter.AdapterOfClass;
import cn.edu.scau.cmi.xuxingao.adapter.SortUtil;
import cn.edu.scau.cmi.xuxingao.adapter.Student;

public class testMain {
	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		List<Integer> intList = new ArrayList<Integer>();
		List<Student> stuList = new ArrayList<Student>();
		int id;
		String name;
		for(int i=0;i<5;i++) {
			id = scanner.nextInt();
			name = scanner.next();
			intList.add(id);
			stuList.add(new Student(id,name));
		}
		SortUtil su = new SortUtil();
		AdapterOfClass aoc = new AdapterOfClass();
		su.sortInt(intList);
		aoc.sortStudent(intList, stuList);
		for(int i=0;i<5;i++) {
			System.out.println(stuList.get(i).getId()+" "+stuList.get(i).getName());
		}
		
	}
}
